<%@ page import="cn.myschool.service.SubjectService" %><%--
  Created by IntelliJ IDEA.
  User: oldliu
  Date: 2022/7/5
  Time: 9:09
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
  <%
//      Object o=session.getAttribute("USER_LOGIN");
//      if(o==null){
//          //????
//          response.sendError(405,"您还没有登录");
//          return;
//      }
      String id = request.getParameter("id");
      long i =Long.parseLong(id);
      int delete = SubjectService.ME.del(i);
      if(delete>0){
          //out.print("删除成功");
          response.sendRedirect("subjectServlet");
      }else{
          out.print("删除失败，可能有关联的数据<a href='subject.jsp'>返回</a>");
      }
  %>
</body>
</html>
